@model VotingSystem.ViewModels.ChangePasswordViewModel

@{
    ViewData["Title"] = "修改密码";
}

<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card shadow-sm">
                <div class="card-body">
                    <h2 class="card-title text-center mb-4">
                        <i class="fas fa-key"></i> @ViewData["Title"]
                    </h2>
                    <form asp-action="ChangePassword" method="post">
                        <div asp-validation-summary="ModelOnly" class="text-danger"></div>

                        <div class="mb-3">
                            <label asp-for="CurrentPassword" class="form-label"></label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="fas fa-lock"></i></span>
                                <input asp-for="CurrentPassword" class="form-control" placeholder="请输入当前密码" />
                            </div>
                            <span asp-validation-for="CurrentPassword" class="text-danger"></span>
                        </div>

                        <div class="mb-3">
                            <label asp-for="NewPassword" class="form-label"></label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="fas fa-key"></i></span>
                                <input asp-for="NewPassword" class="form-control" placeholder="请输入新密码" />
                            </div>
                            <span asp-validation-for="NewPassword" class="text-danger"></span>
                        </div>

                        <div class="mb-3">
                            <label asp-for="ConfirmPassword" class="form-label"></label>
                            <div class="input-group">
                                <span class="input-group-text"><i class="fas fa-key"></i></span>
                                <input asp-for="ConfirmPassword" class="form-control" placeholder="请确认新密码" />
                            </div>
                            <span asp-validation-for="ConfirmPassword" class="text-danger"></span>
                        </div>

                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-save"></i> 保存修改
                            </button>
                            <a asp-action="Profile" class="btn btn-outline-secondary">
                                <i class="fas fa-arrow-left"></i> 返回个人资料
                            </a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
} 